package com.cmc6.user.model.dto;

import com.cmc6.common.constant.BaseRegexConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@EqualsAndHashCode(callSuper = true)
@Data
public class UserCenterUpdateEmailDTO extends EmailNotBlankDTO {

    @NotBlank
    @Pattern(regexp = BaseRegexConstant.CODE_NUMBER_6_REGEXP)
    @ApiModelProperty(value = "邮箱验证码", required = true)
    private String code;

    @NotBlank
    @ApiModelProperty(value = "前端加密之后的密码，修改邮箱属于敏感操作，所以需要输入密码", required = true)
    private String password;

}
